package org.alwayssuper.protocol.gbt32960;

import org.alwayssuper.protostar.annotation.Field;
import org.alwayssuper.protostar.annotation.Message;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.alwayssuper.protocol.basics.GBTMessage;
import org.alwayssuper.protocol.commons.GBTRequestType;
import org.alwayssuper.protocol.commons.transform.RealTimeConverterV2016;
import org.alwayssuper.protocol.commons.transform.RealTimeConverterV2025;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * G03 补发信息上报
 * 支持GB/T 32960.3-2016 (version=0) 和 GB/T 32960.3-2025 (version=1) 两个版本
 * 
 * 数据格式与实时信息上报(G02)完全相同，仅命令标识不同
 * 用于补发7日内的历史数据
 * 
 * @author alwaysSuper
 */
@ToString
@Data
@Accessors(chain = true)
@Message(GBTRequestType.补发信息上报)
public class G03 extends GBTMessage {
    @Field(length = 6, desc = "数据采集时间(YYMMDDHHMMSS)")
    private LocalDateTime collectTime;
    
    @Field(converter = RealTimeConverterV2016.class, desc = "实时信息上报2016版", version = 0)
    @Field(converter = RealTimeConverterV2025.class, desc = "实时信息上报2025版", version = 1)
    private Map<Integer, Object> realTimeData;

}